<link rel="stylesheet" type="text/css" href="<?php echo themeUrl().'/scripts/fancybox/jquery.fancybox-1.3.4.custom.css'; ?>" />
<script type="text/javascript" src="<?php echo themeUrl().'/scripts/fancybox/jquery.fancybox-1.3.4.custom.js'; ?>"></script>

<style type="text/css">
#fancybox-content { border-width : 0px !important; }
</style>

<h1>Current Theme</h1>

<div class="current-theme-section">
    <div class="theme-screenshot">
        <?php echo CHtml::image($currentTheme['screenshot'],$currentTheme['name']); ?>
    </div>
    <p class="theme-name"><?php echo $currentTheme['name'] ?></p>
</div>

<?php if (count($otherAvailableThemes) > 0) : $countThemes = count($otherAvailableThemes); ?>
    <h1>Available Themes</h1>

    <ul id="available-themes" cellpadding="0" cellspacing="0">
       
            <?php
				foreach($otherAvailableThemes as $key => $theme) :               
            ?>
				<li>
					<div class="inner">
						<a href="<?php echo $this->createUrl('/Admin/admin/theme/preview',array('id'=>$theme['name'],'layout'=>'popup')); ?>"><?php echo CHtml::image($theme['screenshot'],$theme['name']); ?></a>
					</div>
					<p class="theme-name"><a href="<?php echo $this->createUrl('/Admin/admin/theme/preview',array('id'=>$theme['name'],'layout'=>'popup')); ?>"><?php echo $theme['name'] ?></a></p>    
				</li>
            <?php
				endforeach;
            ?>    
    </ul>
<?php endif; ?>

<script type="text/javascript">
$('a.lnk-preview-theme').fancybox({
    'type': 'iframe',
    'width': 350,
    'scrolling' : 'no',
    'model' : false,
    'showCloseButton' : true,
    'autoScale' : false,
    'hideOnOverlayClick' : false,
    'autoDimensions' : false,
    'titleShow' : false,
    'titlePosition' : 'outside',
    'transitionIn' : 'face',
    'transitionOut' : 'face',
    'easingIn' : 'linear',
    'easingOut' : 'linear',
    'onClosed' : function(){
        window.location.reload();
    }
});
</script>